package cn.kgc.ubagnet.service.coupon;

import cn.kgc.ubagnet.mapper.CouponMapper;
import cn.kgc.ubagnet.pojo.CouponExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CouponServiceImpl implements CouponService {
    @Resource
    CouponMapper couponMapper;
    @Override
    public Integer seleCouByUserid(Integer id) {
        CouponExample example=new CouponExample();
        CouponExample.Criteria criteria = example.createCriteria();
        criteria.andUseridEqualTo(id);
        int i = couponMapper.countByExample(example);
        return i;
    }
}
